package com.mb.mp.service;

import com.alibaba.fastjson.JSONObject;
import com.mb.mp.domain.MpMemberCommissionDtlDO;
import com.mb.mp.domain.MpMemberInfoDO;
import com.mb.mp.domain.MpUserInfoDO;

import java.math.BigDecimal;
import java.util.List;
import java.util.Map;

/**
 * 产品管理服务
 *
 * @author
 * @create 2018-09-19 下午3:34
 **/

public interface IMemberService {
    /**
     * 分页查询
     * @param map
     * @return
     */
    public List<MpMemberInfoDO> queryList(Map<String, Object> map);

    public int count(Map<String, Object> map);


    /**
     * 分页查询用户列表
     * @param map
     * @return
     */
    public List<MpUserInfoDO> queryUserList(Map<String, Object> map);

    public int userCount(Map<String, Object> map);

    /**
     * 发放佣金
     * @param
     * @return
     */
    public int gain(MpUserInfoDO userInfoDO);

    /**
     * 撤销已发放佣金
     * @param userInfoDO
     * @return
     */
    public int cancel(MpUserInfoDO userInfoDO);

    /**
     * 佣金汇总
     * @param memberId
     * @param month
     * @return
     */
    public BigDecimal getCommission(Long memberId, String month);

    /**
     * 佣金统计
     * @return
     */
    public JSONObject commissionStats(MpMemberCommissionDtlDO memberCommissionDtlDO);


    public MpMemberInfoDO getMember(Long memberId);

    public int updateAliapyAccount(MpMemberInfoDO memberInfo);

    public int setVip(MpMemberInfoDO memberInfo);

    public int cancelVip(MpMemberInfoDO memberInfo);

    public int removeMember(MpMemberInfoDO memberInfo);


}
